<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/11/9
  Time: 10:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>登录</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css"/>
</head>
<body>
<form action="users/login" method="GET">
    <h2 style="text-align: center;">登录</h2>
    <c:if test="${errorCode == 0}">
        <span>此账户已登录</span>
    </c:if>
    <c:if test="${errorCode == -2}">
        <span>没有此账户</span>
    </c:if>
    <span>${err}</span>
    <span>${msg}</span>
    <div class="reg">
        <label for="username">个人账号:</label>
        <input type="text" class="field" name="username" id="username" placeholder="账号长度不能少于3位！"/>
    </div>
    <br>
    <div class="reg">
        <label for="password">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
        <input type="password" class="field" name="password" id="password" placeholder="密码长度不能少于6位！"/>
    </div>
    <br>
    <div class="form-item">
        <button type="submit" class="fill" id="submitBtn">登录</button>
    </div>
    <div class="readme">
        <p class="logins">新账号，立即 <a href="${pageContext.request.contextPath}/register">注册</a></p>
    </div>
</form>
</body>
</html>
